# -*- coding: utf-8 -*-
# https://blog.csdn.net/weixin_52040868
# 公众号：测个der
# 微信：qing_an_an

from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import *
import sys


class WinForm(QWidget):
    def __init__(self):
        super(WinForm, self).__init__()
        self.resize(700, 500)

        layout = QHBoxLayout()
        layout.addWidget(QPushButton("清安"))
        layout.addWidget(QPushButton(str(1)), 0, Qt.AlignLeft | Qt.AlignTop)
        layout.addWidget(QPushButton(str(2)), 0, Qt.AlignLeft | Qt.AlignBottom)
        layout.addWidget(QPushButton(str(3)), 0, Qt.AlignLeft | Qt.AlignCenter)
        layout.addWidget(QPushButton(str(4)), 0, Qt.AlignRight | Qt.AlignTop)
        layout.setSpacing(20)

        self.setLayout(layout)


if __name__ == '__main__':
    app = QApplication(sys.argv)
    win = WinForm()
    win.show()
    sys.exit(app.exec_())
